package visualization;

import edu.uci.ics.jung.visualization.decorators.ToStringLabeller;
import util.MyUtil;

public class MyVertexLebeller<V> extends ToStringLabeller<V> {
	public String intToString(int i) {
		return MyUtil.numberToGreeceString(i);
	}

	public String transform(V v) {
		try {
			int i = (Integer) v;
			if (i < 10)
				return intToString(i);
			else {
				int from = i / 10;
				int to = i % 10;
				return "I" + intToString(from) + intToString(to);
			}
		} catch (Exception e) {
			return v.toString();
		}
	}
}